<!DOCTYPE html>
<html>
{include file='/common/_meta'}
<body>
	<!-- 头部 -->
{include file='/common/top'}
	<!-- /头部 -->
	
	<div class="main-container container-fluid">
		<div class="page-container">
			            <!-- Page Sidebar -->
                {include file='/common/left'}
            <!-- /Page Sidebar -->
            <!-- Page Content -->
            <div class="page-content">
                <!-- Page Breadcrumb -->
                <div class="page-breadcrumbs">
                    <ul class="breadcrumb">
                        <li>
                            <a href="{:url('Index/index')}">系统</a>
                        </li>
                        <li class="active">商品管理</li>
                    </ul>
                </div>
                <!-- /Page Breadcrumb -->

                <!-- Page Body -->
                <div class="page-body">
                    
<div class="row">
    <div class="col-lg-12 col-sm-12 col-xs-12">
        <div class="widget">
            <div class="widget-body">
                <div class="flip-scroll">
                    <table class="table table-bordered table-hover">
                        <thead class="">
                            <tr>
                                {volist name='attrContent' id='attrContents'}
                                    <th class="text-center" width="10%">{$key}</th>
                                {/volist}
                                <th class="text-center" width="14%">库存量</th>
                                <th class="text-center" width="14%">操作</th>
                            </tr>
                        </thead>
                        
                        <tbody>
                            <tr>
                                <?php foreach($attrContent as $k=>$v):?>
                                    <td align="center">
                                        <select name="" id="">
                                            <option value="">请选择</option>
                                            <?php foreach($v as $k1=>$v1):?>
                                                <option value=""><?php echo $v1['commattr_value'];?></option>
                                            <?php endforeach;?>
                                        </select>
                                    </td>
                                <?php endforeach;?>
                                <td align="center">
                                    <input type="text" name="" id="" />
                                </td>
                                <td align="center">
                                    <button type="button" class="btn btn-sm btn-azure btn-addon" onClick="addtrlist(this);">+</button>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                <div> 
              	</div>
            </div>
        </div>
    </div>
</div>

                </div>
                <!-- /Page Body -->
            </div>
            <!-- /Page Content -->
		</div>	
	</div>

	    <!--Basic Scripts-->
    {include file='/common/footer'}    
    <script src="__plus__/uploadify/jquery.uploadify.js"></script>
    <script type="text/javascript">
        function addtrlist(tr){
            var trs = $(tr).parent().parent();
            newtr = trs.clone();
            if ( $(tr).text() === '+' ){
                trs.find('button').text('-');
                trs.before( newtr );
            } else {
                trs.remove();
            }
        }
    </script>
</body>
</html>